//
//  MigrationConfig.swift
//  App
//
//  Created by 汤泽川 on 2019/3/25.
//

import Foundation
import Vapor
import FluentMySQL

public func MigrationConfigure(_ config: inout Config, _ env: inout Environment, _ services: inout Services) throws {
    var migrations = MigrationConfig()
    /*------Migration Start------*/
    
    migrations.add(model: Todo.self, database: .mysql)
    migrations.add(model: VerifyCode.self, database: .mysql)
    migrations.add(model: UserRegisterInfo.self, database: .mysql)
    migrations.add(model: UserInfo.self, database: .mysql)
    migrations.add(model: UserAccessToken.self, database: .mysql)
    migrations.add(model: StoryInfo.self, database: .mysql)
    migrations.add(model: StoryCategory.self, database: .mysql)
    migrations.add(model: CommentModel.self, database: .mysql)
    migrations.add(model: CollectionStoryInfo.self, database: .mysql)
    migrations.add(model: UserFollowInfo.self, database: .mysql)
    
    /*------Migration End------*/
    services.register(migrations)
}
